package com.laputa.system;

import java.util.Calendar;
import java.util.Hashtable;
import java.util.Random;


public class Lib {
	
	private static Random random = null;
	private static long seed = 20;
	
	public static int random(int range){
		if(random == null)
			random = new Random(seed);
		return random.nextInt(range);
	}
	
	private static Hashtable<Long, String> typeTobuilding = null;
	public static long HOTEL = 0;
	public static long APARTMENT = 1;
	public static long HOSPITAL = 2;
	public static long SUPERMARKET = 3;
	
	public static String getBuilding(Long type){
		if(typeTobuilding == null){
			typeTobuilding = new Hashtable<Long, String>();
			typeTobuilding.put(HOTEL, "宾馆");
			typeTobuilding.put(APARTMENT, "住宅楼");
			typeTobuilding.put(HOSPITAL, "医院");
			typeTobuilding.put(SUPERMARKET , "超市");
		}
		return typeTobuilding.get(type);
	}
	
	private static Calendar calendar = null;
	
	public static int getCurrentTime(){
		if(calendar == null)
			calendar = Calendar.getInstance();
		return calendar.get(Calendar.DATE);
	}
	
	public static long emptyGroundPrice = 100000;
	public static long defaultUserMoney = 1000000;
	
}
